<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件处理指令讲解</title>
    <script src="../angular.js"></script>
</head>
<body>
    <div ng-app="gg" ng-controller="ctrl">
        <!--<div onclick="run()" >clickme</div>-->

        <!--<div ng-click="click()">ng-click 事件处理</div>-->

        <!--ng-change 文本改变时触发-->
        <!--ng-chang 必须有ng-model-->
        <!--<input type="text" ng-change="click()" ng-model="title">-->

        <!--ng-blur失去焦点时触发-->
        <!--<input type="text" ng-blur="click()" >-->

        <!--ng-focus 获取焦点时触发-->
        <!--<input type="text" ng-focus="click()">-->

        <!--键盘事件-->
        <!--<input type="text" ng-keydown="click()">-->
        <!--<input type="text" ng-keypress="click()">-->

        <!--鼠标事件-->
        <!--<input type="text" ng-mousedown="click()">-->
        <!--<input type="text" ng-mouseup="click()">-->
        <!--<input type="text" ng-mouseenter="click()">-->
        <!--<input type="text" ng-mouseleave="click()">-->
        <input type="text" ng-mousemove="click()">

    </div>



<script>
    var mod = angular.module('gg', []);
    mod.controller('ctrl', ['$scope',function ($scope) {
        $scope.click =function () {
            console.log('show me');
        }
    }])

    function run() {
        console.log(111)
    }
</script>
</body>
</html>